package 复习.面试TOP101.链表;

public class 反转链表 {
    public ListNode ReverseList(ListNode head) {
        ListNode slow = head;
        ListNode tmp = null;
        while(slow != null){
            ListNode fast = slow.next;
            slow.next = tmp;
            tmp = slow;
            slow = fast;
        }
        return tmp;
    }
}
